3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to save and restore the states of all the channels associated with a controller. You should save the controller states when your application becomes inactive and restore them when it becomes active once again.
You can use the Q3ControllerState_New function to create a new controller state object.
TQ3ControllerStateObject Q3ControllerState_New (
TQ3ControllerRef controllerRef);
The Q3ControllerState_New function returns, as its function result, a reference to a new controller state object for the controller specified by the controllerRef parameter. You need to call Q3ControllerState_SaveAndReset to actually fill in the new controller state object with the current channels. If Q3ControllerState_New cannot create a new controller state object, it returns NULL .
You can use the Q3ControllerState_SaveAndReset function to save the current state of a controller.
TQ3Status Q3ControllerState_SaveAndReset (
TQ3ControllerStateObject controllerStateObject);
The Q3ControllerState_SaveAndReset function saves the current state of the controller that is associated with the controller state object specified by the controllerStateObject parameter. Q3ControllerState_SaveAndReset also resets those channels to their inactive states. You should call Q3ControllerState_SaveAndReset to save a controller's channels when your application becomes inactive.
You can use the Q3ControllerState_Restore function to restore a saved set of controller state values.
TQ3Status Q3ControllerState_Restore (
TQ3ControllerStateObject controllerStateObject);
Previous | QD3D Book | Overview | Chapter Contents | Next |